package com.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * Created by qhe on 2018/7/30.
 */

@FeignClient(value = "hello-service",configuration = FeignConfiguration.class)
public interface HelloService {

    @RequestMapping("/hello")
    String hello();


    @RequestMapping(value = "/hello_name",method = RequestMethod.GET)
    String index(@RequestParam("name") String name);

    @RequestMapping(value = "/hello_age",method = RequestMethod.GET)
    String index(@RequestHeader("name") String name, @RequestHeader("age") Integer age);


    @RequestMapping(value = "/hello_user",method = RequestMethod.POST)
    String index(@RequestBody User user);
}
